<template >
  <div>
    <div style="width: 90%;padding: 30px 0;margin:0 auto;">
      <view class="userinfo">
        <view class="userinfo-avatar">
          <open-data  type="userAvatarUrl"></open-data>
        </view>
        <open-data type="userNickName"></open-data>
      </view>
      <div class="box">
        <div class="logo clearfix">
          <!--          <img :src="logoimg" alt="" class="logoimg" mode="widthFix"/>-->
          <div class="comname">浙江智通线缆有限公司</div>
        </div>
        <div  class="color clearfix">
          <button open-type='contact' class="kefubutton">
            <img :src="kefuimg" alt="" class="img" mode="widthFix"/>
            <div class="tit">在线客服</div>
          </button>
        </div>
        <div  class="color clearfix" @click="freeTell">
          <img :src="phoneimg" alt="" class="img" mode="widthFix"/>
          <div class="tit">服务热线</div>
        </div>
      </div>
      <div class="jishu">技术支持：精科数码</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "",
    data() {
      return {
        list: [],
        logoimg:[
          "../../static/images/logo.png"
        ],
        phoneimg:[
          "../../static/images/phone.png"
        ],
        kefuimg:[
          "../../static/images/kefu.png"
        ]
        // markers: [{
        //   iconPath: "../../static/images/map.png",
        //   id: 0,
        //   latitude: 31.123939,
        //   longitude: 121.277854,
        //   width: 21,
        //   height: 21,
        //   callout: {
        //     content: "上海沪雷电气有限公司",
        //     color: "#ffffff",
        //     fontSize: "14",
        //     borderRadius: 3,
        //     bgColor: "#ffffff",
        //     padding: 2,
        //     display: "ALWAYS" ,
        //     bgColor:"#000000"
        //   }
        // }],
      }
    },

    methods: {
      // requestData() {
      //   const that = this;
      //   // console.log(that)
      //   const api = 'https://shhldq.com/xcxcontact';
      //   wx.request({
      //     url: api, //仅为示例，并非真实的接口地址
      //     data: {
      //     },
      //     header: {
      //       'content-type': 'application/json' // 默认值
      //     },
      //     success: function(res) {
      //       var htmlContent = res.data.info
      //       console.log('htmlContent')
      //       res.data.info = htmlContent.replace(/(\<img|\<p)/gi, function ($0, $1) {
      //         return {
      //           '<img': '<img style="max-width:100%; display:inherit;height:auto" ',
      //           '<p': '<p style="margin-bottom: 0px;" ',
      //         }[$1]
      //       })
      //       that.list=res.data;
      //     }
      //   })
      // },
      freeTell: function(){
        wx.makePhoneCall({
          phoneNumber: '0577-62578588',
        })
      }
    },
    /*生命周期函数*/
    onShow(){
      // this.requestData()
    }
  }
</script>

<style scoped>

  .info{
    width: 90%;
    margin:10px auto;
  }
  map{
    width: 100%;
    margin-bottom: 10px;
  }
  .userinfo .user_img{
    margin:0 auto;
    width: 100px;
    display: block;
    height: 100px;
    border-radius: 50px;
  }
  .userinfo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .userinfo-avatar {
    overflow:hidden;
    display: block;
    width: 160rpx;
    height: 160rpx;
    margin: 20rpx;
    margin-top: 50rpx;
    border-radius: 50%;
    border: 8px solid #fff;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
  }
  .userinfo{
    /* color: #fff; */
    font-size: 14px;
  }
  .box{
    width: 85%;
    margin: 30px auto;
    box-shadow: 0 0 20px rgba(0,0,0,.2);
    -moz-box-shadow: 0 0 20px rgba(0,0,0,.2);
    -webkit-box-shadow: 0 0 20px rgba(0,0,0,.2);
  }
  .box .logo{
    padding:5px 20px 5px;
    height: 40px;
  }
  .box .logoimg{
    width: 26px!important;
    float: left;
    margin-top: 5px;
  }
  .comname{
    float: left;
    color: #005bac;
    font-weight: bold;
    line-height: 40px;
  }
  .kefubutton{
    background: none;
    border: none;
    background: #005bac;
    padding-left: 0;
    padding-right: 0;
  }
  .kefubutton::after{
    border: none;
  }
  .color{
    padding:5px 20px 5px;
    background: #005bac;
    color: #ffffff;
    border-radius: 0;
    margin-bottom: 2px;
    height: 40px;
    overflow: hidden;
  }
  .color .img{
    width: 20px!important;
    float: left;
    margin-top: 10px;
  }
  .color .tit{
    float: left;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
    margin-left: 5px;
    line-height: 40px;
  }
  .jishu{
    text-align: center;
    font-size: 14px;
    color: #5c5858;
  }
</style>
